<template>
    <div>
       <el-table
    :data="tableData"
    :default-sort="{ prop: 'date', order: 'descending' }"
    style="width: 100%"
  >
    <el-table-column prop="createDate" label="消费时间" sortable width="300" />
    <el-table-column prop="name" label="名字" width="180" />
    <el-table-column prop="phone" label="电话号码" width="180" />
    <el-table-column prop="money" label="消费金额" />
  </el-table>
    </div>
</template>
<script>
import { getconsume } from "../api"
export default {
  data() {
    return {
      tableData: [
      ],
    }
  },
  methods: {
    formatter(row, column) {
      return row.address
    },
  },
  created:function(){
     getconsume(this.$route.params.id).then(res=>{
         this.tableData=res.data.data
     })
  }
}
</script>




